home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / ntsp3 / nt4sp3_i.exe / [0] / oemnsvdh.srv < prev    next >
INI File  |  1997-05-01  |  24KB  |  559 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     DHCP
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "4"
  8. ProductMinorVersion     = "0"
  9. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. ProductOpSupport     = 132 
  11. ProductDHCPName         = "DHCPServer"
  12. ProductDHCPImagePath    = "%SystemRoot%\System32\tcpsvcs.exe"
  13. ProductDHCPSvcType      = "autoserviceshare"
  14. NetRuleDHCPType     = "dhcpserver tcpipService dhcp"
  15. NetRuleDHCPUse      = "service yes yes"
  16. NetRuleDHCPBindForm = """Dhcpserver"" yes yes container"
  17. NetRuleDHCPClass    = {"dhcp tcpipService yes"}
  18. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  19. [GeneralConstants]
  20. UtilityInf       = "UTILITY.INF"
  21. subroutineinf    = "SUBROUTN.INF"
  22. Exit_Code        = 0
  23. BillboardVisible = 0
  24. from      = ""
  25. to        = ""
  26. ExitCodeOk     = 0
  27. ExitCodeCancel = 1
  28. ExitCodeFatal  = 2
  29. KeyNull         = ""
  30. MAXIMUM_ALLOWED   = 33554432
  31. SERVICE_NO_CHANGE = 4294967295
  32. RegistryErrorIndex = NO_ERROR
  33. KeyProduct      = ""
  34. KeyParameters   = ""
  35. TRUE            = 1
  36. FALSE           = 0
  37. NoTitle         = 0
  38. ExitState   = "Active"
  39. OldVersionExisted = $(FALSE)
  40. [date]
  41.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  42. [Identify]
  43.     read-syms Identification
  44.     set Status     = STATUS_SUCCESSFUL
  45.     set Identifier = $(OptionType)
  46.     set Media      = #("Source Media Descriptions", 1, 1)
  47.     Return $(Status) $(Identifier) $(Media)
  48. [ReturnOptions]
  49.     set Status        = STATUS_FAILED
  50.     set OptionList     = {}
  51.     set OptionTextList = {}
  52.     set LanguageList = ^(LanguagesSupported, 1)
  53.     Ifcontains(i) $($0) in $(LanguageList)
  54.         goto returnoptions
  55.     else
  56.         set Status = STATUS_NOLANGUAGE
  57.         goto finish_ReturnOptions
  58.     endif
  59. returnoptions = +
  60.     set OptionList     = ^(Options, 1)
  61.     set OptionTextList = ^(OptionsText$($0), 1)
  62.     set Status         = STATUS_SUCCESSFUL
  63. finish_ReturnOptions = +
  64.     Return $(Status) $(OptionList) $(OptionTextList)
  65. [InstallOption]
  66.     set Option   = $($1)
  67.     set SrcDir   = $($2)
  68.     set AddCopy  = $($3)
  69.     set DoCopy   = $($4)
  70.     set DoConfig = $($5)
  71.     set LanguageList = ^(LanguagesSupported, 1)
  72.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  73.         Return STATUS_NOLANGUAGE
  74.     endif
  75.     Debug-Output "OEMNSVCU.INF: STF_CWDIR is: "$(!STF_CWDIR)
  76.     Debug-Output "OEMNSVCU.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  77.     set-subst LF = "\n"
  78.     read-syms GeneralConstants
  79.     read-syms FileConstants
  80.     read-syms DialogConstants$(!STF_LANGUAGE)
  81.     ifstr(i) $(!NTN_Origination) == "NCPA"
  82.         set Continue = $(OK)
  83.     endif
  84.     read-syms FileConstants$(!STF_LANGUAGE)
  85.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  86.     detect date
  87.     set-title  $(FunctionTitle)
  88.     set to   = Begin
  89.     set from = Begin
  90.     set CommonStatus = STATUS_SUCCESSFUL
  91.     EndWait
  92. Begin = +
  93.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  94.         set StartLabel = removeadapter
  95.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  96.         set StartLabel = UpgradeSoftware
  97.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  98.         set StartLabel = configureadapter
  99.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  100.             Debug-Output "Cannot configure the software."
  101.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  102.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  103.                 Debug-Output "ShellCode error: cannot get an error string."
  104.                 goto ShellCodeError
  105.             endif
  106.             set Error = $($R0)
  107.             set from = end
  108.             set to = end
  109.             goto nonfatalinfo
  110.         endif
  111.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  112.         set StartLabel = bindingadapter
  113.     else
  114.         set StartLabel = installadapter
  115.         set OEM_ABANDON_SOFTWARE = {}
  116.         set OEM_ABANDON_OPTIONS = {}
  117.     endif
  118.     set from = $(fatal)
  119.     set to = $(fatal)
  120.     goto $(StartLabel)
  121. installadapter = +
  122.     ifstr(i) $(!NTN_InstallMode) == "install"
  123.        Ifstr(i) $(DoCopy) == "YES"
  124.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  125.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  126.               Goto ShellCodeError
  127.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  128.               Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  129.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  130.                   goto ShellCodeError
  131.               endif
  132.               set Error = $($R0)
  133.               Goto fatal
  134.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  135.                Goto successful
  136.            Endif
  137.            Set SrcDir = $($R1)
  138.         EndIf
  139.         Debug-Output "OEMNSVCU.INF: installadapter: installing [Install-Option]"
  140.         install "Install-Option"
  141.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  142.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  143.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  144.                goto ShellCodeError
  145.            endif
  146.            set Error = $($R0)
  147.            goto fatal
  148.         endif
  149.     endif
  150.     set OEM_ABANDON_ON  = TRUE
  151.     StartWait
  152.     set ThisOption = DHCP
  153.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  154.         $(Product$(ThisOption)Name),+
  155.         $(Product$(ThisOption)Name),+
  156.         $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  157.         $(Product$(ThisOption)ImagePath),+
  158.         $(Product$(ThisOption)SvcType),+
  159.         "", {"Tcpip"}, "", "%SystemRoot%\System32\dhcpssvc.dll", 7, "", "", "",+
  160.         "%SystemRoot%\System32\kernel32.dll"
  161.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  162.         Debug-Output "OEMNXPTC.INF: ShellCode error, add software component"
  163.         goto ShellCodeError
  164.     endif
  165.     set RegistryErrorIndex = $($R0)
  166.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  167.         EndWait
  168.         Debug-Output "OEMNSVDH.INF: Registry error: add software components"
  169.         CloseRegKey $($R1)
  170.         CloseRegKey $($R2)
  171.         CloseRegKey $($R3)
  172.         CloseRegKey $($R4)
  173.         CloseRegKey $($R5)
  174.         goto fatalregistry
  175.     endif
  176.     Set DHCPVersKeyHandle  = $($R1)
  177.     set DHCPNetRulesKeyHandle = $($R2)
  178.     CloseRegKey $($R3)
  179.     Set DHCPParmKeyHandle  = $($R4)
  180.     Set DHCPLinkageHandle  = $($R5)
  181.     set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"Rpcss","NTLMSSP"}}}
  182.     Shell  $(UtilityInf), AddValueList, $(DHCPLinkageHandle), $(NewValueList)
  183.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  184.         Debug-Output "OEMNXPTC.INF: ShellCode error."
  185.         goto ShellCodeError
  186.     endif
  187.     CloseRegKey $(DHCPLinkageHandle)
  188.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),"service"},+
  189.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  190.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  191.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  192.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  193.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  194.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  195.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  196.     Shell  $(UtilityInf), AddValueList, $(DHCPVersKeyHandle), $(NewValueList)
  197.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  198.         Debug-Output "OEMNXPTC.INF: ShellCode error, add value list"
  199.         goto ShellCodeError
  200.     endif
  201.     set RegistryErrorIndex = $($R0)
  202.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  203.         EndWait
  204.         Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  205.         CloseRegKey $(DHCPVersKeyHandle)
  206.         CloseRegKey $(DHCPNetRulesKeyHandle)
  207.         CloseRegKey $(DHCPParmKeyHandle)
  208.         goto fatalregistry
  209.     Endif
  210.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleDHCPType)},+
  211.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleDHCPClass)}, +
  212.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleDHCPUse)}, +
  213.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleDHCPBindForm)}, +
  214.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  215.     Shell  $(UtilityInf), AddValueList, $(DHCPNetRulesKeyHandle), $(NewValueList)
  216.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  217.         Debug-Output "ShellCode error."
  218.         goto ShellCodeError
  219.     endif
  220.     CloseRegKey $(DHCPNetRulesKeyHandle)
  221.     set RegistryErrorIndex = $($R0)
  222.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  223.         EndWait
  224.         Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  225.         CloseRegKey $(DHCPVersKeyHandle)
  226.         CloseRegKey $(DHCPParmKeyHandle)
  227.         goto fatalregistry
  228.     Endif
  229.     set NewValueList = {{APIProtocolSupport,$(NoTitle),$(!REG_VT_DWORD),5},+
  230.                        {DebugFlag,$(NoTitle),$(!REG_VT_DWORD),0},+
  231.                        {DatabaseName,$(NoTitle),$(!REG_VT_SZ),"dhcp.mdb"},+
  232.                        {BackupDatabasePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\System32\dhcp\backup"},+
  233.                        {BackupInterval,$(NoTitle),$(!REG_VT_DWORD),60},+
  234.                        {DatabaseLoggingFlag,$(NoTitle),$(!REG_VT_DWORD),1},+
  235.                        {DatabaseCleanupInterval,$(NoTitle),$(!REG_VT_DWORD),1440},+
  236.                        {RestoreFlag,$(NoTitle),$(!REG_VT_DWORD),0},+
  237.                        {DatabasePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\System32\dhcp"}}
  238.     Shell  $(UtilityInf), AddValueList, $(DHCPParmKeyHandle), $(NewValueList)
  239.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  240.         Debug-Output "OEMNXPTC.INF: ShellCode error, add value list"
  241.         goto ShellCodeError
  242.     endif
  243.     set RegistryErrorIndex = $($R0)
  244.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  245.         EndWait
  246.         Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  247.         CloseRegKey $(DHCPVersKeyHandle)
  248.         CloseRegKey $(DHCPParmKeyHandle)
  249.         goto fatalregistry
  250.     Endif
  251.     CreateRegKey $(DHCPParmsKeyHandle) {"MultiHomeInfo",$(NoTitle),GenericClass} "" +
  252.                 $(MAXIMUM_ALLOWED) "" KeyMultiHomeInfo
  253.     CloseRegKey $(KeyMultiHomeInfo)
  254.     CreateRegKey $(DHCPParmsKeyHandle) {"Configuration",$(NoTitle),GenericClass} "" +
  255.                 $(MAXIMUM_ALLOWED) "" KeyConfiguration
  256.     CloseRegKey $(KeyConfiguration)
  257.     CloseRegKey $(DHCPVersKeyHandle)
  258.     CloseRegKey $(DHCPParmsKeyHandle)
  259.     ifstr(i) $(!STF_INSTALL_TYPE) != "SETUPBOOTED"
  260.     Shell "" AddDHCP
  261.     endif
  262.     Shell "oemnsvsn.inf" InstallMicrosoftAgent "DHCPServer" "DhcpMibAgent" "%SystemRoot%\System32\dhcpmib.dll"
  263.     ifstr(i)  $(!STF_GUI_UNATTENDED) == YES
  264.         Shell "subroutn.inf" GetDefaultAnswer "NetCardParameterList"
  265.             CreateRegKey $(!REG_H_LOCAL) {$(!NTN_ServiceBase)"\DHCPServer\Configuration", $(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyConfig
  266.             ifstr $(KeyConfig) != $(KeyNull)
  267.                 CreateRegKey $(KeyConfig) {"GlobalOptionValues",$(NoTitle),GenericClass} "" +
  268.                     $(MAXIMUM_ALLOWED) "" KeyGlobalOption
  269.                 CloseRegKey $(KeyGlobalOption)
  270.                 CreateRegKey $(KeyConfig) {"Subnets",$(NoTitle),GenericClass} "" +
  271.                     $(MAXIMUM_ALLOWED) "" KeySubnets
  272.                 ifstr $(KeySubnets) != $(KeyNull)
  273.                     CreateRegKey $(KeySubnets) {"10.0.0.0",$(NoTitle),GenericClass} "" +
  274.                         $(MAXIMUM_ALLOWED) "" KeyDefSubnet
  275.                     ifstr $(KeyDefSubnet) != $(KeyNull)
  276.                         SetRegValue $(KeyDefSubnet) {SubnetAddress, $(NoTitle), $(!REG_VT_DWORD), 167772160}
  277.                         SetRegValue $(KeyDefSubnet) {SubnetMask, $(NoTitle), $(!REG_VT_DWORD), 4294967040}
  278.                         SetRegValue $(KeyDefSubnet) {SubnetState, $(NoTitle), $(!REG_VT_DWORD), 0}
  279.                         SetRegValue $(KeyDefSubnet) {SubnetComment, $(NoTitle), $(!REG_VT_SZ), "Default Configuration"}
  280.                         SetRegValue $(KeyDefSubnet) {SubnetName, $(NoTitle), $(!REG_VT_SZ), "Default Subnet"}
  281.                         SetRegValue $(KeyDefSubnet) {ExcludedIpRanges, $(NoTitle), $(!REG_VT_BIN), {00,00,00,00}}
  282.                         CreateRegKey $(KeyDefSubnet) {"DHCPServers",$(NoTitle),GenericClass} "" +
  283.                             $(MAXIMUM_ALLOWED) "" KeyDhcpServers
  284.                         CreateRegKey $(KeyDhcpServers) {"127.0.0.1",$(NoTitle),GenericClass} "" +
  285.                             $(MAXIMUM_ALLOWED) "" KeyLocalHost
  286.                           SetRegValue $(KeyLocalHost) {ServerIpAddress, $(NoTitle), $(!REG_VT_DWORD), 2130706433}
  287.                           SetRegValue $(KeyLocalHost) {Role, $(NoTitle), $(!REG_VT_DWORD), 1}
  288.                           SetRegValue $(KeyLocalHost) {ServerHostName, $(NoTitle), $(!REG_VT_SZ), ""}
  289.                           SetRegValue $(KeyLocalHost) {ServerNetBiosName, $(NoTitle), $(!REG_VT_SZ), ""}
  290.                         CloseRegKey $(KeyDhcpServers)
  291.                         CreateRegKey $(KeyDefSubnet) {"IpRanges",$(NoTitle),GenericClass} "" +
  292.                             $(MAXIMUM_ALLOWED) "" KeyIpRanges
  293.                           CreateRegKey $(KeyIpRanges) {"10.0.0.1",$(NoTitle),GenericClass} "" +
  294.                               $(MAXIMUM_ALLOWED) "" KeyRange
  295.                             SetRegValue $(KeyRange) {StartAddress, $(NoTitle), $(!REG_VT_DWORD), 167772161}
  296.                             SetRegValue $(KeyRange) {EndAddress, $(NoTitle), $(!REG_VT_DWORD), 167772415}
  297.                             SetRegValue $(KeyRange) {InUseClusters, $(NoTitle), $(!REG_VT_BIN), {00,00,00,00}}
  298.                             SetRegValue $(KeyRange) {UsedClusters, $(NoTitle), $(!REG_VT_BIN), {00,00,00,00}}
  299.                           CloseRegKey $(KeyRange)
  300.                         CloseRegKey $(KeyIpRanges)
  301.                         CreateRegKey $(KeyDefSubnet) {"ReservedIps",$(NoTitle),GenericClass} "" +
  302.                             $(MAXIMUM_ALLOWED) "" KeyReservedIps
  303.                         CloseRegKey $(KeyReservedIps)
  304.                         CreateRegKey $(KeyDefSubnet) {"SubnetOptions",$(NoTitle),GenericClass} "" +
  305.                             $(MAXIMUM_ALLOWED) "" KeySubnetOptions
  306.                         CreateRegKey $(KeySubnetOptions) {"051",$(NoTitle),GenericClass} "" +
  307.                             $(MAXIMUM_ALLOWED) "" KeyOption51
  308.                         SetRegValue $(KeyOption51) {OptionValue, $(NoTitle), $(!REG_VT_BIN), {24,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,128,244,03,00,00,00,00}}
  309.                         CloseRegKey $(KeySubnetOptions)
  310.                         CloseRegKey $(KeyDefSubnet)
  311.                     else
  312.                         Debug-Output "OEMNSVDH.INF: error creating 10.0.0.0 key"
  313.                     endif
  314.                     CloseRegKey $(KeySubnets)
  315.                 else
  316.                    Debug-Output "OEMNSVDH.INF: error creating Subnets key"
  317.                 endif
  318.             else
  319.                 Debug-Output "OEMNSVDH.INF: error creating Configuration key"
  320.             endif
  321.     endif
  322.     EndWait
  323.     Shell $(UtilityInf) SetMasterComponent Microsoft Tcpip $(STF_CONTEXTINFNAME) DHCP
  324.     ifstr(i) $(!NTN_InstallPhase) != primary
  325.         ifstr(i)  $(!STF_GUI_UNATTENDED) != YES
  326.             read-syms DHCPServerDialog
  327.             ui start "Warning"
  328.         endif
  329.     endif
  330.     return STATUS_SUCCESSFUL
  331. configureadapter = +
  332.     goto end
  333. bindingadapter =+
  334.     goto end
  335. removeadapter = +
  336.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductDHCPName)
  337.     ifstr(i) $(!STF_INSTALL_TYPE) != "SETUPBOOTED"
  338.         install "Remove-DHCP-Icon"
  339.     endif
  340.     Shell "oemnsvsn.inf" RemoveMicrosoftAgent "DhcpMibAgent"
  341.     goto end
  342. UpgradeSoftware = +
  343.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  344.     Ifstr $(KeyProduct) != $(KeyNull)
  345.         install "Install-Update"
  346.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  347.             goto fatal
  348.         endif
  349.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  350.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  351.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)}
  352.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  353.         install "Remove-DHCP-Icon"
  354.         install "Install-DHCP-Icon"
  355.         CloseRegKey $(KeyProduct)
  356.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\DHCPServer\Parameters" $(MAXIMUM_ALLOWED) DHCPSrvKey
  357.         ifstr(i) $(DHCPSrvKey) != ""
  358.             SetRegValue $(DHCPSrvKey) {BackupInterval,$(NoTitle),$(!REG_VT_DWORD),60}
  359.             GetRegValue $(DHCPSrvKey),"DatabaseCleanupInterval", IntervalInfo
  360.             ifint *($(IntervalInfo),4) == 86400
  361.                 SetRegValue $(DHCPSrvKey) {DatabaseCleanupInterval,$(NoTitle),$(!REG_VT_DWORD),1440}
  362.             endif
  363.             CloseRegKey $(DHCPSrvKey)
  364.         endif
  365.     endif
  366.     goto end
  367. successful = +
  368.     goto end
  369. infomsg =+
  370.    read-syms InfoDlg
  371.    ui start "Warning"
  372.    set CommonStatus = STATUS_USERCANCEL
  373.    goto end
  374. warning = +
  375.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  376.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  377.         goto ShellCodeError
  378.     endif
  379.     ifstr(i) $($R1) == "OK"
  380.         goto $(to)
  381.     else-ifstr(i) $($R1) == "CANCEL"
  382.         goto $(from)
  383.     else
  384.         goto "end"
  385.     endif
  386. nonfatalinfo = +
  387.     Set CommonStatus = STATUS_USERCANCEL
  388.     Set Severity = STATUS
  389.     goto nonfatalmsg
  390. nonfatal = +
  391.     Set Severity = NONFATAL
  392.     goto nonfatalmsg
  393. nonfatalmsg = +
  394.     ifstr(i) $(Error) == ""
  395.         Set Severity = NONFATAL
  396.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  397.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.             goto ShellCodeError
  399.         endif
  400.         set Error = $($R0)
  401.     endif
  402.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  403.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  404.         goto ShellCodeError
  405.     endif
  406.     ifstr(i) $($R1) == "OK"
  407.         goto $(from)
  408.     else
  409.         goto "end"
  410.     endif
  411. fatalregistry = +
  412.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  413.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  414.         goto ShellCodeError
  415.     endif
  416.     set Error = $($R0)
  417.     goto fatal
  418. fatal = +
  419.     ifstr(i) $(Error) == ""
  420.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  421.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  422.             goto ShellCodeError
  423.         endif
  424.         set Error = $($R0)
  425.     endif
  426.     Ifint $(BillboardVisible) != 0
  427.         Shell "subroutn.inf" PopBillboard
  428.         Set BillboardVisible = 0
  429.     Endif
  430.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  431.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  432.         goto ShellCodeError
  433.     endif
  434.    goto setfailed
  435. ShellCodeError = +
  436.     set DlgType      = "MessageBox"
  437.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  438.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  439.     set STF_MB_TYPE  = 1
  440.     set STF_MB_ICON  = 3
  441.     set STF_MB_DEF   = 1
  442.     ui start "Error Message"
  443.     goto setfailed
  444. setfailed = +
  445.     set CommonStatus = STATUS_FAILED
  446.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  447.         set OEM_ABANDON_ON = FALSE
  448.         goto removeadapter
  449.     endif
  450.     goto end
  451. end = +
  452.     goto term
  453. term = +
  454.     Return $(CommonStatus)
  455. [GetFilesSize]
  456.     set FileSizeList = ^(Files-DHCP,3)
  457.     set TotalSize = 0
  458.     ForListDo $(FileSizeList)
  459.         Split-String $($) "=" SplitString
  460.         set Size = *($(SplitString),3)
  461.         set-add TotalSize = $(TotalSize) $(Size)
  462.     EndForListDo
  463.     set-div SizeInK = $(TotalSize) 1024
  464.     return $(SizeInK)
  465. [Install-Option]
  466.     set STF_VITAL = ""
  467.     ifstr(i) $(AddCopy) == "YES"
  468.         AddSectionFilesToCopyList Files-DHCP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  469.     endif
  470.     ifstr(i) $(DoCopy) == "YES"
  471.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  472.        CopyFilesInCopyList
  473.     else
  474.         LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\DHCPADMN.EXE $(!STF_WINDOWSSYSPATH)\DHCPADMN.EXE
  475.     endif
  476.     ifstr(i) $(DoConfig) == "YES"
  477.     endif
  478.     Exit
  479. [Install-Update]
  480.    set STF_VITAL        = ""
  481.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  482.    AddSectionFilesToCopyList Files-DHCP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  483.    Exit
  484. [Install-DHCP-Icon]
  485.     CreateCommonProgManGroup $(GroupName), ""
  486.     RemoveCommonProgManItem $(GroupName), $(IconName)
  487.     CreateCommonProgManItem $(GroupName), $(IconName), dhcpadmn.exe, dhcpadmn.exe, ""
  488.     ShowCommonProgManGroup $(GroupName), 6
  489.     exit
  490. [Remove-DHCP-Icon]
  491.     RemoveCommonProgManItem $(OldGroupName), $(IconName)
  492.     RemoveCommonProgManItem $(GroupName), $(IconName)
  493.     exit
  494. [AddDHCP]
  495.     read-syms FileConstants$(!STF_LANGUAGE)
  496.     read-syms GeneralConstants
  497.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\DHCPServer" $(MAXIMUM_ALLOWED) ProductKey
  498.     ifstr(i) $(ProductKey) != ""
  499.         install "Install-DHCP-Icon"
  500.         CloseRegKey $(ProductKey)
  501.     endif
  502.     return
  503. [Source Media Descriptions]
  504.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  505. [Signature]
  506.     FileType = MICROSOFT_FILE
  507. [GetSignature]
  508.     read-syms Signature
  509.     return $(FileType)
  510. [ProductType]
  511. STF_PRODUCT  = LanmanNT
  512. STF_PLATFORM = I386
  513. [Files-Inf]
  514. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  515. [Files-DHCP]
  516. 1, DHCPADMN.CNT, SIZE=1849
  517. 1, DHCPADMN.EXE, SIZE=259344
  518. 1, DHCPADMN.HLP, SIZE=56486
  519. 1, DHCPMIB.DLL, SIZE=12048
  520. 1, DHCPSSVC.DLL, SIZE=115984
  521. 1, IPADRDLL.DLL, SIZE=14096, NODELETESOURCE
  522. 1, JETPACK.EXE, SIZE=9488, NODELETESOURCE
  523. [LanguagesSupported]
  524.     ENG
  525. [DialogConstantsENG]
  526. Help        = "&Help"
  527. Exit        = "Cancel"
  528. OK          = "OK"
  529. HelpContext = ""
  530. Continue    = "Continue"
  531. Cancel      = "Cancel"
  532. [FileDependentDlgENG]
  533. ProCaption   = "Windows NT Setup"
  534. ProCancel    = "Cancel"
  535. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  536.                "Are you sure you want to cancel copying files?"
  537. ProCancelCap = "Network Setup Message"
  538. ProText1     = "Copying:"
  539. ProText2     = "To:"
  540. [FileConstantsENG]
  541. ProductDHCPDisplayName  = "Microsoft DHCP Server"
  542. ProductDHCPTitle        = "Microsoft DHCP Server"
  543. ProductDHCPDescription  = "Automatically assigns IP addresses to other computers running the DHCP (Dynamic Host Configuration Protocol) Client Service."
  544. OldGroupName    = "Network Administration"
  545. GroupName    = "Administrative Tools"
  546. IconName     = "DHCP Manager"
  547. [OptionsTextENG]
  548.         DHCP = "Microsoft DHCP Server"
  549. [DHCPServerDialog]
  550. DHCPTxt = "If any adapters are using DHCP to obtain an IP address, they are now "+
  551.            "required to use a static IP address.  Press Close on the Network Control Panel "+
  552.            "and the TCP/IP Property Sheet will be displayed allowing you to enter an address."
  553. STF_MB_TITLE = $(DHCP)
  554. DlgType = "MessageBox"
  555. STF_MB_TEXT  = $(DHCPTxt)
  556. STF_MB_TYPE  = 1
  557. STF_MB_ICON  = 2
  558. STF_MB_DEF   = 1
  559.